#pragma once
#include "crfHolder0.h"
//////////////////////////////////////////////////////////////////////////

class crfTrainImp0
{
public:
	crfTrainImp0();
	~crfTrainImp0() { if(_gradient) delete[]( _gradient);if(_lambda) delete[](_lambda); }

	void Train(char *fea_file,char* lambda_file,vector<string> trainfiles,int save_step=2,int save_startid=0,bool bcheck=false);

	double *_lambda;
	double *_gradient;
	int		_feature_num_all;
	int _depth;
	int _prior;
	int _sen_num;

	double _sigma;
	double _eta;
	memPool<char> pool_work_space;
	freelist<char> _temp_space;
	crfHolder0	   _foMst;
	memPool<char> temPool;
};